//@ts-ignore
import * as lib from "libreqwest.so";
import { Options } from "./Options";
import { Response } from "./Response";

export class HttpClient {
  private client: lib.HttpClient;

  constructor() {
    this.client = new lib.HttpClient();
  }

  sendRequest(option: Options): Promise<Response> {
    return this.client.sendRequest(option);
  }

  sendRequestAsync(option: Options): Promise<Response> {
    return lib.sendRequestAsync(option);
  }
}